/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vehicles;

/**
 *
 * @author jonesbr
 */
public class Prius extends Car {
    
    protected boolean hybrid = false;
    
        public void go(int distance) {

        // only do this if we are not a prius, or we are a prius, and we're running internalCombustion.
        if (!hybrid) {
            // compute the gallons of gas used.
            double gallonsOfGasUsed = distance / milesPerGallon;

            // add gallonsOfGasUsed to the running tally; gasConsumed.
            gasConsumed += gallonsOfGasUsed;

            // subtract the gallons used from the gallons available.
            gallonsOfGas = gallonsOfGas - gallonsOfGasUsed;
        }

        // increase the odometer.
        odometer = odometer + distance;

        // increase the trip odometer.
        tripOdometer += distance;
    }

    @Override
    public String getCarClass() {
        return getClass().getSimpleName();
    }

    
}
